import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
// https://vitejs.dev/config/
export default defineConfig({
    server: {
        port: 8080,
        open: false,
        host:'0.0.0.0',
        proxy: { // 配置本地代理地址
            '/netEasyMusicLink': {
                target: 'https://music.163.com/',
                changeOrigin: true,
                rewrite: (path) => path.replace(/^\/netEasyMusicLink/, '')
            },
            '/netEasyMusic': {
                target: 'http://localhost:8090/',
                changeOrigin: true,
                rewrite: (path) => path.replace(/^\/netEasyMusic/, '')
            },

        }
    },
    plugins: [
        vue()
    ],
    resolve: {
        alias: {
            "@": path.resolve(__dirname, 'src'),
        },
    },
})
